import { createApp,createSSRApp  } from 'vue'
import App from './App.vue'
import router, { setupRouter } from '/@ts/router'
import {setupStore} from '/@ts/store/index';
import ElementPlus from 'element-plus'
import 'element-plus/theme-chalk/display.css';//1.1.0-beta.10 版本
import 'element-plus/dist/index.css'//1.1.0-beta.10 版本
import 'animate.css/animate.min.css';
import 'element-plus/theme-chalk/dark/css-vars.css'// 由于当前界面的UI是自定义的所以无效



// 国际化
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
import "dayjs/locale/zh-cn";
import { setupDirectivePage } from "/@ts/directive/page";

import {i18n} from '/@ts/language/index';

import { initComponent } from "./component";
import { checkVersion, initGlobal } from './plugins/tool';
import {
      EasyPrint,
    PreviewPrint
} from 'element-easy-print'
import elementEasyPrint from 'element-easy-print'
import 'element-easy-print/dist/style.css'

import './init.scss';
export const app = createApp(App);

initGlobal()
app.use(i18n);
app.use(elementEasyPrint);
app.use(ElementPlus, { locale: zhCn }); //element-plus挂载
setupStore(app)
initComponent(app)
// window.log.success("添加接口","成功")
// window.log.error("添加接口","失败")
// window.log.warning("添加接口","警告")
checkVersion()
setupRouter(app)


setupDirectivePage(app)
app.mount('#app')


